<template>
	<view>
		<!-- <image :src="dataObj.cover" mode="aspectFill" style="height: 20vh;" @click="ViewImage(dataObj.cover)"></image> -->
		<view class="news-detail">
			<view class="detail-title">{{ dataObj.title }}</view>
			<view class="detail-extra">
				<text>来源：曲塘高级中学</text>
				<!-- <text>编辑时间：{{ dataObj.updateTime }}</text> -->
			</view>
			<view class="detail-content">
				<view v-html="dataObj.content"></view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		org_detail
	} from '@/common/api/api.js';

	export default {
		data() {
			return {
				dataObj: {}
			}
		},
		onLoad(e) {
			this.dataObj.id = e.id
			this.getData()
		},
		methods: {
			getData() {
				org_detail({
					id: this.dataObj.id
				}).then(res => {
					this.dataObj = this.$s.res(res)
				})
			},
			ViewImage(e) {
				this.dataObj.imgList = [e]
				uni.previewImage({
					urls: this.dataObj.imgList,
					current: 0
				});
			},
		}
	}
</script>

<style lang="scss" scoped>
	.news-detail {
		background-color: #ffffff;

		.detail-title {
			border-left: 10rpx solid rgb(229, 77, 66);
			padding: 0 30rpx;
			font-size: $uni-font-size-title;
			font-weight: bold;
			color: $uni-color-title;
			line-height: 1.5;
		}

		.detail-extra {
			padding: 20rpx 30rpx;
			font-size: 24rpx;
			color: $uni-text-color-grey;
		}

		.detail-content {
			padding: 30rpx 30rpx;
			font-size: $uni-font-size-paragraph;
			color: $uni-color-paragraph;
			line-height: 2;
			padding-bottom: 120rpx;
		}
	}
</style>